import prompt from '@system.prompt'
export default {
    data: {
        steps:[
            {
                label:{
                    prevLabel: 'BACK',
                    nextLabel: 'NEXT',
                    status: 'normal'
                },
                title:"First screen"
            },
            {
                label:{
                    prevLabel: 'BACK',
                    nextLabel: 'NEXT',
                    status: 'normal'
                },
                title:"Second screen"

            },
            {
                label:{
                    prevLabel: 'BACK',
                    nextLabel: 'FINISH',
                    status: 'normal'
                },
                title:"Third screen"
            }
        ],
        status:['normal','disabled','waiting','skip'],
        statusIndex:0,

    },
    setRightButton(e) {
        this.$element('mystepper').setNextButtonStatus({status: this.status[this.statusIndex], label: (this.status[this.statusIndex]).toUpperCase()});
    },
    nextclick(e) {
        var index = {
            pendingIndex: e.pendingIndex
        }
        return index;
    },
    backclick(e) {
        var index = {
            pendingIndex: e.pendingIndex
        }
        return index;
    },
    changeStatus(e){
        this.statusIndex=e;
    },
    finish(){
        prompt.showToast({
            message: "Finish",
            duration: 3000,
        });
    },
    skip(){
        prompt.showToast({
            message: "Skip",
            duration: 3000,
        });
    }
}
